export class Time{
    public static getTodayDate():string{
        const date = new Date();
        
        const year = date.getFullYear();
        const month = date.getMonth() + 1;
        const day = date.getDate();
        const hour = date.getHours();
        const minute = date.getMinutes();

        return year.toString()+this.NtoS(month)+this.NtoS(day)+"_"+this.NtoS(hour)+this.NtoS(minute)
    }

    public static getDayDate():string{
        const date = new Date();
        
        const year = date.getFullYear();
        const month = date.getMonth() + 1;
        const day = date.getDate();
       
        return year.toString()+this.NtoS(month)+this.NtoS(day)
    }


    public static NtoS(date:number):string{
        return ("00"+date).slice(-2);
    }
}